package com.example.designpatterns.creational.singleton;

/**
 * 懒汉式单例模式
 *
 * @author scott
 */
public class LazySimpleSingleton {

    private static LazySimpleSingleton instance;

    private LazySimpleSingleton() {
    }

    public synchronized static LazySimpleSingleton getInstance() {
        if (null == instance) {
            instance = new LazySimpleSingleton();
        }
        return instance;
    }

}
